<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        * {
            margin: 0;
            padding: 0;
        }
        ul li {
            list-style: none;
            width: 200px;
            height: 100px;
            float: left;
        }

        li:nth-child(1) {
            background: rgb(255, 17, 0);
        }
        li:nth-child(2) {
            background: rgb(212, 255, 0);
        }
        li:nth-child(3) {
            background: rgb(13, 232, 9);
        }
        .text {
            width: 100px;
            height: 150px;
            background: rgb(0, 255, 255);
            /* clear: both; */
        }
        /* .clear {
            clear: both;
        } */
        /* .clear::after {
            content: '';
            clear: both;
            display: block;
        } */
        ul {
           display: table-cell
        }
    </style>
</head>
<body>
    <div class="container">
        <ul >
            <li>1</li>
            <li>2</li>
            <li>3</li>
            <!-- <div class="clear"></div>清除浮动 -->
        </ul>

        <div class="text">hellow world</div>


    </div>
</body>
</html>